import Vue from 'vue'
import VueRouter from 'vue-router'
//
import Home from './views/Home.vue'
import Main from './views/page1/main.vue'
import Table from './views/page1/table1.vue'
//
import about from './views/page2/About.vue'
import ass from './views/page2/ass.vue'
import test from './views/page2/test.vue'

Vue.use(VueRouter)

export default new VueRouter({
  routes: [
    {
      path: '/',
      component: Home,
      name: '导航一',
      iconCls: 'el-icon-message', // 图标样式class
      redirect: '/main',
      children: [
        {
          path: 'main',
          component: Main,
          name: '主页'
        },
        { path: 'table', component: Table, name: 'Table' }
      ]
    },
    {
      path: '/',
      name: '导航二',
      component: Home,
      iconCls: 'el-icon-time', // 图标样式class
      children: [
        { path: 'about', component: about, name: 'about' },
        { path: 'ass', component: ass, name: 'ass' },
        { path: 'test', component: test, name: 'test' }

      ]
    }

  ]
})
